* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #333;
    overflow: hidden;
}

.container {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: 
        "header header"
        "nav main";
    height: 100vh;
}

header {
    grid-area: header;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
    color: #7f8c8d;
    font-size: 1.1em;
}

.light-controls {
    grid-area: nav;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.light-controls h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.control-group {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.control-group label {
    display: flex;
    align-items: center;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    cursor: pointer;
}

.control-group input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.color-control {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.color-control input[type="color"] {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.color-control input[type="range"] {
    flex: 1;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.color-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.color-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#resetLights {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#resetLights:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

main {
    grid-area: main;
    position: relative;
    overflow: hidden;
}

#scene-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.info-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
    max-height: 70vh;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.info-panel h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.info-panel p {
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 0.9em;
    color: #34495e;
}

.info-panel strong {
    color: #2c3e50;
}

.light-detail {
    background: rgba(248, 249, 250, 0.8);
    border-left: 4px solid #4CAF50;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
}

.light-detail:hover {
    background: rgba(240, 248, 255, 0.9);
    border-left-color: #2196F3;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.light-detail h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
}

.light-detail p {
    margin: 6px 0;
    font-size: 0.9em;
    line-height: 1.4;
}

.light-detail p strong {
    color: #34495e;
    font-weight: 600;
}

.light-detail ul {
    margin: 8px 0 8px 20px;
    padding: 0;
}

.light-detail ul li {
    margin: 4px 0;
    font-size: 0.85em;
    line-height: 1.4;
    color: #555;
}

.light-detail code {
    background: rgba(52, 73, 94, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85em;
    color: #e74c3c;
    font-weight: 500;
}

/* 滚动条样式 */
.info-panel::-webkit-scrollbar {
    width: 8px;
}

.info-panel::-webkit-scrollbar-track {
    background: rgba(240, 240, 240, 0.5);
    border-radius: 4px;
}

.info-panel::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.6);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.info-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.8);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 250px 1fr;
    }
    
    .info-panel {
        max-width: 300px;
        font-size: 0.8em;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
        grid-template-areas: 
            "header"
            "nav"
            "main";
    }
    
    .light-controls {
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .control-group {
        margin-bottom: 10px;
        padding: 10px;
    }
    
    .info-panel {
        position: relative;
        bottom: auto;
        right: auto;
        margin: 10px;
        max-width: none;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    header p {
        font-size: 1em;
    }
}

/* 滚动条样式 */
.light-controls::-webkit-scrollbar {
    width: 8px;
}

.light-controls::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.light-controls::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.light-controls::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* 动画效果 */
.control-group {
    transition: all 0.3s ease;
}

.control-group:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}